﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="XWord.Fundamental.Domain" namespace="XWord.Fundamental.Domain">
  <class name ="RCArticle" dynamic-update="true">
    <id name="Id" column="Id">
      <generator class="guid.comb"/>
    </id>

    <property name="Part"/>
    <property name="CreateTime"/>
    <property name="CompleteMinute"/>
    <property name="Content"/>
    <property name="ArticleType"/>
    <property name="PointWords"/>

    <set name="GapFillList" lazy="true" cascade="all-delete-orphan" inverse="false">
      <key column="ArticleId"/>
      <one-to-many class="GapFill"/>
    </set>

    <set name="Questions" table="ArticleQuestion" lazy="true" cascade="all-delete-orphan">
      <key column="ArticleId"/>
      <many-to-many column="QuestionId" order-by="Priority"
       class="Question"/>
    </set>
  </class>
</hibernate-mapping>